function Benchmark(iterations, functionA, argumentsA, functionB, argumentsB)
{
	var time = new Date().getTime();
	
	var i = iterations;
	while (i--)
		functionA.apply(this, argumentsA);
	var timeA  = new Date().getTime();
	var delayA = timeA - time;
	
	i = iterations;
	while (i--)
		functionB.apply(this, argumentsB);
	var timeB  = new Date().getTime();
	var delayB = timeB - timeA;
	
	alert("FunctionA: " + delayA);
	alert("FunctionB: " + delayB);
	
	return delayA < delayB ? functionA : functionB;
}